<?php

require("admin-header.php");
require_once("../include/set_get_key.php");
if (!(isset($_SESSION['administrator']))){
	echo "<a href='../loginpage.php'>请先登录!</a>";
	exit(1);
}
echo "<title>管理员列表</title>"; 
echo "<center><h2>管理员列表</h2></center>";
$sql="select * FROM cr_privilege where rightstr in ('administrator','".$BM_ADMIN."') ";
$result=mysql_query($sql) or die(mysql_error());
echo "<center><table width=90% border=1>";
echo "<tr><td>用户名<td>权限<td>删除</tr>";
for (;$row=mysql_fetch_object($result);){
	echo "<tr>";
	echo "<td>".$row->user_id;
	echo "<td>".$row->rightstr;
	echo "<td><a href=privilege_delete.php?uid=$row->user_id&rightstr=$row->rightstr&getkey=".$_SESSION['getkey'].">Delete</a>";
	echo "</tr>";
}
echo "</table></center>";
require("../bm-footer.php");
?>
